package com.handsome.适配器模式.对象适配器;


import com.handsome.适配器模式.类适配器.Voltage220;

/**
 * 适配器类
 * @author niechun
 * @date 2023/2/1 21:04
 */
public class VoltageAdapter implements Voltage5 {
    private Voltage220 voltage220;

    public Voltage220 getVoltage220() {
        return voltage220;
    }

    public void setVoltage220(Voltage220 voltage220) {
        this.voltage220 = voltage220;
    }

    public VoltageAdapter(Voltage220 voltage220) {
        this.voltage220 = voltage220;
    }


    @Override
    public int output5() {
        System.out.println("适配电压");
        int result=voltage220.output220()/44;
        return result;
    }
}
